package com.offcn.search.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

/****
 * @Author:ujiuye
 * @Description:Item构建
 * @Date 2021/2/1 14:19
 *****/
@Document(indexName = "skuinfo")
public class Item implements Serializable{


	@Id
	private Long id;

	@Field(type = FieldType.Text,analyzer = "ik_smart")
	private String title;

	@Field(type = FieldType.Double)
	private BigDecimal price;


	private Integer num;


	private String image;


	private String status;


	private Date createTime;


	private Date updateTime;


	private String isDefault;


	private Long goodsId;

	@Field(type = FieldType.Keyword)
	private String category;

	@Field(type = FieldType.Keyword)
	private String brand;


	private String spec;

	private Map<String ,Object> specMap;

	public Item() {
		super();
	}

	public Item(Long id, String title, BigDecimal price, Integer num, String image, String status, Date createTime, Date updateTime, String isDefault, Long goodsId, String category, String brand, String spec, Map<String, Object> specMap) {
		this.id = id;
		this.title = title;
		this.price = price;
		this.num = num;
		this.image = image;
		this.status = status;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.isDefault = isDefault;
		this.goodsId = goodsId;
		this.category = category;
		this.brand = brand;
		this.spec = spec;
		this.specMap = specMap;
	}

	public Map<String, Object> getSpecMap() {
		return specMap;
	}

	public void setSpecMap(Map<String, Object> specMap) {
		this.specMap = specMap;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(String isDefault) {
		this.isDefault = isDefault;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getSpec() {
		return spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}
}
